<?php 

defined('_JEXEC') or die;
class utils
{
	static function GetStoreID()
	{
		$db		= JFactory::getDbo();
		$query	= $db->getQuery(true);
		$user = JFactory::getUser();
  		$uid = $user->id;
  		
  		$query->select("l.id");
		$query->from("#__bakery_locations l");
  		$query->where('l.location_user = '.(int) $uid);
  		$db->setQuery($query);
  		return $db->loadResult();
	}
}

?>